package main

import "fmt"

func main() {
	fmt.Println(singleNumber([]int{1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 1}))
}

func singleNumber(nums []int) int {
	ans := 0
	for _, v := range nums {
		ans ^= v
	}
	return ans
}
